<div class="grid_9">

<?php if($this->session->flashdata('type')): ?>
	<div class="<?php echo $this->session->flashdata('type')?>"><?php echo $this->session->flashdata('msg')?></div>
<?php endif; ?>

<div class="inner-border">
<h6>Edit Course</h6>
<?php if(!empty($db_entries)): ?>
	<?php
		$formAttrib = array('id' => 'editcourse', 'class' => 'admin-form');
		foreach($db_entries as $db_entry){
			$hiddenAttrib = array('course_id' => $db_entry->course_id);
			$courseNameAttrib = array('name' => 'course_name', 'value' => $db_entry->course_name, 'id' => 'coursename');
			$courseCodeAttrib = array('name' => 'course_code', 'value' => $db_entry->course_code, 'id' => 'coursecode');
			$courseDescAttrib = array('name' => 'course_desc', 'value' => $db_entry->course_desc, 'id' => 'coursedesc');
			$courseFvalAttrib = array('name' => 'course_unit_value', 'value' =>$db_entry->course_unit_value , 'id' => 'course_code');
		
		}
		echo form_open('post/update_course', $formAttrib);
	?>
    
    <div class="input-block">
    <?php
		echo form_label('Level Name:', 'levelname');
		echo form_input($courseNameAttrib);
	?>
    </div>
	    <div class="input-block">
    <?php
		echo form_label('Course Code:', 'coursecode');
		echo form_input($courseCodeAttrib);
	?>
    </div>
	<div class="input-block">
    <?php
		echo form_label('Course value :', 'Course status');
		echo form_input($courseFvalAttrib);	
	?>
    </div>
	<div class="input-block">
    <?php
		echo form_label('Course Description:', 'coursedesc');
		echo form_textarea($courseDescAttrib);
		echo form_hidden($hiddenAttrib);
	?>
    </div>
	<? echo form_submit('update', 'Update');?>
<?php else: ?>
	<div class="notice">Please try again</div>
<?php endif; ?>
<a href="<?php echo site_url('admin/course') ?>" class="btn">Back</a>	
</div>
</div>